package top.flvio.middleware.dynamic;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import top.flvio.middleware.DBContextHolder;

/**
 * @description: 动态数据源获取
 * @author: flvio
 * @date: 2025/2/5
 */
public class DynamicDataSource extends AbstractRoutingDataSource
{
    @Override
    protected Object determineCurrentLookupKey()
    {
        return "db" + DBContextHolder.getDbKey();
    }
}
